const selectTcSFPurPartList = [
    {
        "id": "1",
        "materialCode": "Duis dese",
        "itemName": "aliquip in qui consectetur irure",
        "drawingNumber": "dolor ut pariatur magn",
        "tcOwner": "irure sunt par",
        "tcGroup": "aliqua",
        "projectCode": "ullamco ea aliquip",
        "reviewStatus": "velit dolore ut",
        "reviewStatusId": "laboris aute",
        "reviewStatusNameEn": "Lorem elit aute",
        "reviewStatusNamePt": "eiusmod",
        "requester": "quis mollit Duis ex",
        "requesterDepartment": "anim",
        "applicationDate": "in dolor ea",
        "materialType": "occaecat Lorem aliqua",
        "processInitiationTime": "nisi",
        "drsAuditor": "mollit veniam ad",
        isParent: true
    },
    {
        "id": "2",
        "materialCode": "Duis dese",
        "itemName": "aliquip in qui consectetur irure",
        "drawingNumber": "dolor ut pariatur magn",
        "tcOwner": "irure sunt par",
        "tcGroup": "aliqua",
        "projectCode": "ullamco ea aliquip",
        "reviewStatus": "velit dolore ut",
        "reviewStatusId": "laboris aute",
        "reviewStatusNameEn": "Lorem elit aute",
        "reviewStatusNamePt": "eiusmod",
        "requester": "quis mollit Duis ex",
        "requesterDepartment": "anim",
        "applicationDate": "in dolor ea",
        "materialType": "occaecat Lorem aliqua",
        "processInitiationTime": "nisi",
        "drsAuditor": "mollit veniam ad",
    }
];

const childBom = [
    {
        "id": "11",
        "materialCode": "Duis dese",
        "itemName": "aliquip in qui consectetur irure",
        "drawingNumber": "dolor ut pariatur magn",
        "tcOwner": "irure sunt par",
        "tcGroup": "aliqua",
        "projectCode": "ullamco ea aliquip",
        "reviewStatus": "velit dolore ut",
        "reviewStatusId": "laboris aute",
        "reviewStatusNameEn": "Lorem elit aute",
        "reviewStatusNamePt": "eiusmod",
        "requester": "quis mollit Duis ex",
        "requesterDepartment": "anim",
        "applicationDate": "in dolor ea",
        "materialType": "occaecat Lorem aliqua",
        "processInitiationTime": "nisi",
        "drsAuditor": "mollit veniam ad",
        isChild: true,
        tagsId: "",
        tagsCn: "已有",
        tagsEn: "已有",
        tagsPt: "已有"
    }
    ,
    {
        "opt": "",
        "itemName": "1",
        "drawingNumber": "2",
        "weightUnit": "2002bVYIb5lUDfzYpRGMzfZ1",
        "unitWeight": "3",
        "materialGroup": "2002n6dGxsgJvHvGnvwbMLJt",
        "materialName": "11111111",
        "materialType": "2002ovxIvx8VJpd3rugw2VvW",
        "companyRoute": "w",
        "materialGrade": "11111111",
        "tagsId": "2002qLglWLpic62LiSOkwuQA",
        "tagsCn": "新增",
        "tagsEn": "Create",
        "tagsPt": "Create",
        "requesterId": "1002Kh8yM2TvzSQovfKZ8Zkp",
        "requesterName": "蔡医生",
        "requesterDepartmentId": "",
        "requesterDepartment": "采购部",
        "applicationDate": "2025-10-29",
        "id": "943532030",
        "parentId": "1",
        "isParent": false,
        "isChild": true,
        "treeGroup": false,
        "editStatus": "add",
        "children": null
    },
    {
        "opt": "",
        "itemName": "aliquip in qui consectetur irure",
        "drawingNumber": "dolor ut pariatur magn",
        "weightUnit": "",
        "unitWeight": "",
        "materialGroup": "",
        "materialName": "",
        "materialType": "occaecat Lorem aliqua",
        "companyRoute": "",
        "materialGrade": "",
        "tagsId": "2002zcsr6KGA1cYLvrtwlgBC",
        "tagsCn": "引用TC",
        "tagsEn": "Reference",
        "tagsPt": "Reference",
        "requesterId": "1002Kh8yM2TvzSQovfKZ8Zkp",
        "requesterName": "蔡医生",
        "requesterDepartmentId": "",
        "requesterDepartment": "采购部",
        "applicationDate": "2025-10-29",
        "id": "2",
        "materialCode": "Duis dese",
        "tcOwner": "irure sunt par",
        "tcGroup": "aliqua",
        "projectCode": "ullamco ea aliquip",
        "reviewStatus": "velit dolore ut",
        "reviewStatusId": "laboris aute",
        "reviewStatusNameEn": "Lorem elit aute",
        "reviewStatusNamePt": "eiusmod",
        "requester": "quis mollit Duis ex",
        "processInitiationTime": "nisi",
        "drsAuditor": "mollit veniam ad",
        "parentId": "1",
        "isParent": false,
        "isChild": true,
        "treeGroup": false,
        "editStatus": "add",
        "children": null
    }
]

// 模拟获取用户列表的 API
export const getSelectTcSFPurPartList = (req: any, res: any) => {
    res.setHeader('Content-Type', 'application/json');
    res.end(JSON.stringify({
        code: "1",
        data: selectTcSFPurPartList,
        msg: '操作成功'
    }));
};

export const getSelectList = (req: any, res: any) => {
    res.setHeader('Content-Type', 'application/json');
    res.end(JSON.stringify({
        code: "1",
        data: selectTcSFPurPartList,
        msg: '操作成功'
    }));
};
export const getChildBom = (req: any, res: any) => {
    res.setHeader('Content-Type', 'application/json');
    res.end(JSON.stringify({
        code: "1",
        data: childBom,
        msg: '操作成功'
    }));
};

export const getMatPart = (req: any, res: any) => {
    res.setHeader('Content-Type', 'application/json');
    res.end(JSON.stringify({
        code: "1",
        data: [{
            materialName: "11111111",
            materialGrade: "11111111"
        }, {
            materialName: "22222222",
            materialGrade: "22222222"
        }, {
            materialName: "3333333",
            materialGrade: "3333333"
        }],
        msg: '操作成功'
    }));
};